public class Car extends Vehicle implements IPower
{

    private String carNumber;

    public Car()
    {

    }

    public Car(String brand, String color, String carNumber)
    {
        super(brand, color);
        this.carNumber = carNumber;
    }

    public String getCarNumber()
    {
        return this.carNumber;
    }

    public void setCarNumber(String carNumber)
    {
        this.carNumber = carNumber;
    }

    public void run()
    {
        System.out.println("开车");
    }

    public void power()
    {
        System.out.println("靠油驱动");
    }
}
